import { createSlice } from "@reduxjs/toolkit";

export type User = {
  account: string;
  password: string;
};

const slice = createSlice({
  name: "user",
  initialState: {
    userData: {
      account: "",
      password: "",
    },
  },
  reducers: {
    setUser: (state, data) => {
      state.userData = data.payload;
    },
  },
});

export default slice;
